﻿@model RonYee.Models.RegisterModel

@{
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_LayoutSecondPage.cshtml";
}

<script src="@Url.Content("~/Scripts/RongeJs/vanadium.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/RongeJs/CheckValue.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div id="primary" class="inner group">
   <div class="layout-sidebar-right group">
      <!-- START CONTENT -->
      <div id="content" role="main" class="group">
        <h2>Create a New Account</h2>
        <p>
            使用下面的表格创建一个新帐户。 密码的最小长度不低于 @Membership.MinRequiredPasswordLength 字符哦！
        </p>

        @using (Html.BeginForm())
        {
        @Html.ValidationSummary(true, "帐号创建不成功哦！请更正错误并再试一次吧。")
         <h2>Account Information</h2>
         <p>
             @Html.ValidationMessageFor(m => m.UserName)
             @Html.ValidationMessageFor(m => m.Password)
             @Html.ValidationMessageFor(m => m.ConfirmPassword)
             @Html.ValidationMessageFor(m => m.Email)
         </p>
         <div id="post-16" class="post-16 page type-page status-publish hentry group">
             <table width="600px">
               <tr>
                  <th width="100px">用户名：</th>
                  <td>
                      @Html.TextBoxFor(m => m.UserName, new { @class = ":required" })<span class="required">*</span>
                  </td>
                </tr><tr>
                  <th>学 号：</th>
                  <td>
                      <input type="text" id="UserNo" name="UserNo" class=":required"  /><span class="required">*</span>
                  </td>
               </tr>

               <tr>
                  <th>密 码：</th>
                  <td>
                      @Html.PasswordFor(m => m.Password, new { @class = ":required" })<span class="required">*</span>
                  </td>
                </tr><tr>
                  <th>确认密码：</th>
                  <td>
                      @Html.PasswordFor(m => m.ConfirmPassword, new { @class = ":required" })<span class="required">*</span>
                  </td>
               </tr>
               <tr>
                  <th>邮 箱：</th>
                  <td>
                      @Html.TextBoxFor(m => m.Email, new { @class = ":email" })<span class="required">*</span>
                  </td>
                </tr><tr>
                  <th>手机号码：</th>
                  <td>
                      <input type="text" id="Phone" name="Phone" class=":phone" /><span class="required">*</span>
                  </td>
               </tr>
               <tr>
                  <th>用户类型</th>
                  <td>
                      @{
                            List<SelectListItem> selectList = new List<SelectListItem>();
                            foreach (object e in Enum.GetValues(typeof(RonYee.Models.Enum.UserType)))
                            {
                                selectList.Add(new SelectListItem { Text = Enum.GetName(typeof(RonYee.Models.Enum.UserType), e), Value = ((int)e).ToString() });
                            }
                               @Html.DropDownList("UserType", selectList);
                         }
                  </td>
                 </tr><tr>
                  <th colspan="2">
                      <input type="submit" class="button" name="Register" value="Register" />
                  </th>
               </tr>
             </table>
               
         </div>
         <div id="comments">
         </div>
        }
      </div> 
   </div> 
</div>

